<template>
<div>
    <h1>详情页面</h1>
  <div class="detail-class">
    
    <h2>
        {{detailList.productName}}
    </h2>
    <img :src="detailList.productImageBig" alt="" style="width:200px">
    <div v-html="detailList.detail"></div>
  </div>
</div>
</template>

<script>
export default {
    data() {
        return {
            detailList:[]
        }
    },
    created(){
        this.getData()
        
    },
    methods:{
        //http://api.mm2018.com:8090/api/goods/productDet?productId=150642571432851
        getData(){
            this.$axios.get(`http://api.mm2018.com:8090/api/goods/productDet?productId=${this.$route.query.productId}`)
            .then(res=>{
                this.detailList = res.data
                // console.log(res.data)
            })
           
        }
    }    
}
</script>

<style scoped> 
    .detail-class{
        text-align: center;
    }

</style>